Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide TagTrait to replace ScenarioTagTrait. #510

Merged
merged 4 commits into from
Oct 26, 2018
Merged

Provide TagTrait to replace ScenarioTagTrait. #510

merged 4 commits into from
Oct 26, 2018

Conversation

pfrenssen
Copy link
Collaborator

Fixes #509.

@pfrenssen
Copy link
Collaborator Author

I have split up the original ScenarioTagTrait into three separate traits since all three are useful on their own:

  • FeatureTrait: allows to access the current FeatureNode inside a Context class.
  • ScenarioTrait: allows to access the current ScenarioNode inside a Context class.
  • TagTrait: allows to retrieve the current tags from the feature or scenario.

The TagTrait depends on the two other traits, but instead of forcing a developer to include all three traits, I wrapped the two depending traits in a helper class which is included as a singleton through a getter method. This makes it easy to use the trait by just adding use TagTrait; to the context class.

@pfrenssen
Copy link
Collaborator Author

This is failing on PHP 5.5 since the PR is using argument unpacking which was introduced in PHP 5.6.

@jhedstrom are you planning on still supporting PHP 5.5 on the 4.x branch?

@jhedstrom
Copy link
Owner

@pfrenssen I'd prefer not to. Honestly, I'd love to only support 7.x, but don't know if that will work for folks still running Drupal 6 or not.

@pfrenssen
Copy link
Collaborator Author

pfrenssen commented Oct 2, 2018

Maybe we should do a poll on Twitter to see if people are still interested in Drupal 6 support for BDE 4.x?

We could also maybe decide to keep supporting 3.x for D6 only, say for one or two years more? We could keep all D7 and D8 issues for 4.x.

I don't think this will be a lot of additional maintenance work, I haven't seen many D6 issues in the queue lately :)

I personally would love to move to PHP 7 for the 4.x branch. But I think we should wait a few months, PHP 5.6 is still officially supported until December of this year.

@pfrenssen
Copy link
Collaborator Author

Added support for PHP 5.5, we can have the discussion about which PHP and Drupal versions to support in the future in a dedicated issue :)

@jhedstrom jhedstrom merged commit 156fb90 into master Oct 26, 2018
@jhedstrom
Copy link
Owner

Makes sense to me! Thanks!

@jhedstrom jhedstrom deleted the tagtrait branch October 26, 2018 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants